For trigger in database

Hi,

Executing:

Tigger t

for t in database do print name t "\n"

Returns:

dynamic 0

dynamic 1.

Also print dxl t, returns emtpy.

Why are those dynamic triggers at database level and what do they do?

-Octavian

 


octavianstanescu - Wed Jul 03 20:42:08 EDT 2013

Re: For trigger in database
llandale - Mon Jul 08 15:17:47 EDT 2013

I investigated these some time ago, IIRC they are the "drag and drop" triggers used to implement those features; something to do with "Discusions".  In any event they were benign and needed to be left alone.

There are some "kind"s of triggers.

  • Stored triggers are stored in the Module/Project/Database and exists for everybody when these things are "loaded".
  • Dynamic triggers are temporary.  In this case one of the native startup include files "deploys" these "dynamic" triggers in YOUR database instance; they are not actually saved in the database.  Typical "dynamic" triggers are stored while you have the module open but are not stored in the database.
  • BuiltIn triggers are controlled by the system, and seem to exist for the purpose of actually invoking a user Dynamic or Stored trigger.  I have never seen a case where I did not want to ignore them.

You cannot retrieve the DXL code behind dynamic nor builtin triggers.  Rats.

When dealing with triggers, consider the following:

  • string TrigKind = kind(trg)
  • if (TrigKind == "builtin")  then continue // ignore "BuiltIn" triggers
  • if (TrigKind == "dynamic") then continue // ignore "Dynamic" triggers

-Louie